<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>餐桌分类</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-card layui-col-md12">
				<div class="layui-card-header">
					{if !$info['id']}<i class="fa fa-plus"></i> 添加餐桌分类{else}<i class="fa fa-pencil"></i> 编辑餐桌分类{/if}
					<i class="layui-icon layui-icon-close" style="font-size:18px;font-weight:bold;cursor:pointer" onclick="closeself()"></i>
				</div>
				<div class="layui-card-body" pad15>
					<div class="layui-form form-label-w6" lay-filter="">
						<input type="hidden" name="info[id]" value="{$info.id}">
						<div class="layui-form-item">
							<label class="layui-form-label">分类名称：</label>
							<div class="layui-input-inline">
								<input type="text" name="info[name]" value="{$info.name}" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
							</div>
						</div>
<!--						<div class="layui-form-item">-->
<!--							<label class="layui-form-label">服务费：</label>-->
<!--							<div class="layui-input-inline">-->
<!--								<input type="number" name="info[service_fee]" value="{$info.service_fee}" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">-->
<!--							</div>-->
<!--						</div>-->
						<div class="layui-form-item">
							<label class="layui-form-label">最低消费：</label>
							<div class="layui-input-inline">
								<input type="number" name="info[limit_fee]" value="{$info.limit_fee}" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">0不限制最低消费，仅预定展示使用</div>
						</div>
						{if !getcustom('restaurant_book_custom')}
						<div class="layui-form-item">
							<label class="layui-form-label">预定费用：</label>
							<div class="layui-input-inline">
								<input type="number" name="info[booking_fee]" value="{$info.booking_fee}" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
							</div>
						</div>
						{/if}
						
						<div class="layui-form-item">
							<label class="layui-form-label">座位数：</label>
							<div class="layui-input-inline">
								<input type="number" min="1" max="200" name="info[seat]" value="{$info.seat}" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">排序：</label>
							<div class="layui-input-inline">
								<input type="text" name="info[sort]" value="{$info.sort|default=0}" class="layui-input">
							</div>
							<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">越大越靠前</div>
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label">状态：</label>
							<div class="layui-input-inline">
								<input type="radio" name="info[status]" value="1" title="启用" {if $info['status']==1 || !$info['id']}checked{/if}>
								<input type="radio" name="info[status]" value="0" title="禁用" {if $info['id'] && $info['status']==0}checked{/if}>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label"></label>
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="formsubmit">提 交</button>
							</div>
						</div>
					</div>
					
				</div>
			</div>
		</div>
  </div>
	{include file="public/js"/}
	<script>
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		var index = layer.load();
		$.post("{:url('save')}",field,function(data){
			layer.close(index);
			dialog(data.msg,data.status);
			if(data.status == 1){
				setTimeout(function(){
					parent.layer.closeAll();
					parent.tableIns.reload()
				},1000)
			}
		})
	})
  </script>
	{include file="public/copyright"/}
</body>
</html>